# Replication Package: Pension Systems, Demographic Aging, and the Home Bias Puzzle: Global Evidence

**Paper 23 in the Demographics & Global Capital Allocation series**
**Brian Peters, March 2026**

---

## Overview

This paper tests whether pension systems mediate demographic home bias. Key finding: pension systems mediate only ~30% of demographic home bias. The full-sample result is specification-sensitive (kaopen suppressor), but low-income concentration (Z₁ = -5,690***) and eurozone amplification (Z₁×EZ = -367***) are robust to all specifications. Institutional capacity is the binding constraint in low-income countries.

## Software Requirements

- Python 3.10+
- Required packages: `numpy`, `pandas`, `statsmodels`, `scipy`, `matplotlib`, `wbgapi`, `python-docx`
- Install: `pip install numpy pandas statsmodels scipy matplotlib wbgapi python-docx`

## Directory Structure

```
replication/
  REPLICATION_README.md
  scripts/
    phase1_data_assembly.py      # Data assembly (merges pension, portfolio, demographics)
    phase2_baseline.py           # Baseline home bias regressions
    phase3_mechanisms.py         # Mediation, interactions, subsample analysis
    phase4_regulatory_channel.py # Regulatory and institutional channels
    build_docx.py                # DOCX generation
  src/
    model.py                     # PanelGLS estimator (shared across series)
    [other shared modules]
  data/processed/
    pension_panel.csv            # Processed panel (pension, home bias, demographics)
  output/tables/
    [24 markdown tables]         # All regression output
  paper/
    paper.md                     # Manuscript source
```

## Reproduction

Run scripts in order:
```bash
python3 scripts/phase1_data_assembly.py
python3 scripts/phase2_baseline.py
python3 scripts/phase3_mechanisms.py
python3 scripts/phase4_regulatory_channel.py
```

**Note:** Scripts use absolute paths (`/mnt/c/demographics_capital_flows/...`). Update the path references at the top of each script for your local environment.

## Data Sources

- UN World Population Prospects (2024 Revision) — age distributions
- IMF CPIS — cross-border portfolio positions (home bias proxy)
- OECD Pension Statistics — pension fund assets, contribution rates
- World Bank WDI — domestic credit, stock market capitalization
- IMF WEO — fiscal balance, GDP
- Chinn-Ito KAOPEN — capital account openness
